import unittest
from unittest.test.l_01_testcase1 import TestDemo1
from unittest.test.l_01_testcase2 import TestDemo2
#实例化套件对象
suite = unittest.TestSuite()
#添加用例方法
#套件对象.addTest(测试类名（'测试方法名'）)
# suite.addTest(TestDemo1('test1_1'))
# suite.addTest(TestDemo1('test1_2'))
# suite.addTest(TestDemo1('test1_3'))
#
# suite.addTest(TestDemo2('test2_1'))
# suite.addTest(TestDemo2('test2_2'))
# suite.addTest(TestDemo2('test2_3'))

# 实例化对象 unittest_01.TextTestRunner()
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestDemo1))
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestDemo2))
runner = unittest.TextTestRunner()
runner.run(suite)

